home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 1999 September (IDG) / Sep99.iso / Shareware World / Comms & Internet / LinkConverter 1.1.2 / Dialog Director v0.7 / Examples / Gauge (Auto).as < prev    next >
Encoding:
Text File  |  1998-01-11  |  1.2 KB  |  28 lines  |  [TEXT/ToyS]

  1. property theIters : [20, 40, 60, 80, 100, 120, 140, 160]
  2. property theDialog : {style:movable dialog, name:"Gauge", size:[300, 125], contents:[¬
  3.     {class:push button, bounds:[10, 95, 90, 115], name:"Forward", action:"forward"}, ¬
  4.     {class:push button, bounds:[110, 95, 190, 115], name:"Backward", action:"backward"}, ¬
  5.     {class:push button, bounds:[210, 95, 290, 115], name:"Done"}, ¬
  6.     {class:pop up, bounds:[10 - 4, 50, 150, 50 + 20], name:"Iterations:", value:3, contents:theIters}, ¬
  7.     {class:gauge, bounds:[10, 10, 290, 10 + 12], value:0, max value:100}, ¬
  8.     {class:gauge, bounds:[10, 30, 290, 30 + 12], value:0, max value:-1} ¬
  9.         ], default item:3}
  10.  
  11. --tell application "FileMaker Pro"
  12. activate
  13. dd auto dialog theDialog with fonts {name:"Geneva", size:10} with grayscale given script:me
  14. --end tell
  15.  
  16. on Forward()
  17.     set maxVal to item (dd get value of item 4 of dialog 1) of theIters
  18.     repeat with x from 1 to maxVal
  19.         dd set value of items 5 thru 6 of dialog 1 to [x, x]
  20.     end repeat
  21. end Forward
  22.  
  23. on Backward()
  24.     set maxVal to item (dd get value of item 4 of dialog 1) of theIters
  25.     repeat with x from maxVal to 0 by -1
  26.         dd set value of items 5 thru 6 of dialog 1 to [x, x]
  27.     end repeat
  28. end Backward